<div class="frame-side-bar">
    <img src="/static/assets/images/CMT-logo.png" class="img-logo" />

    <div class="frame-frame-group1">
        <a class="frame-patient-container pointer-link" href="/patient" {% if active_page=='patient'
            %}style="background-color: #8146ff;" {% endif %}>
            <div class="img-down{% if active_page == 'patient' %}-ac{% endif %}"></div>
            <div class="img-patient"></div>
            <div class="text-patient">
                <div class="p-text-patient">
                    <span class="span-patient" {% if active_page=='patient' %}style="color:white;" {% endif
                        %}>王立群</span>
                </div>
            </div>
        </a>
        <div class="frame-rnK-2">
            <a class="frame-naodian-container" href="/eeg-record" {% if active_page=='eeg_record'
                %}style="background-color:#8146ff;" {% endif %}>
                <div class="frame-naodian-bng"></div>
                <div class="text-naodian">
                    <div class="p-text-naodian">
                        <span class="span-TBj-1" {% if active_page=='eeg_record' %}style="color: white" {% else
                            %}style="color: rgba(97, 103, 127, 1)" {% endif %}>脑电监测</span>
                    </div>
                </div>
                <div class="img-naodian{% if active_page != 'eeg_record' %}-li{% endif %}"></div>
            </a>
            <a class="frame-shuimian-container" href="/sleep-report" {% if active_page=='sleep_report'
                %}style="background-color:#8146ff;" {% endif %}>
                <div class="frame-shuimian-bng pointer-link"></div>
                <div class="text-EEM-2">
                    <div class="p-text-EEM-2">
                        <span class="span-bux-1" {% if active_page=='sleep_report' %}style="color: white" {% endif
                            %}>睡眠监测报告</span>
                    </div>
                </div>
                <div class="img-Jqy-3"></div>
            </a>
            <a class="frame-depression-container" href="/depression-report" {% if active_page=='depression_report'
                %}style="background-color:#8146ff;" {% endif %}>
                <div class="frame-depression-bng pointer-link"></div>
                <div class="text-depression">
                    <div class="p-text-depression">
                        <span class="span-depression" {% if active_page=='depression_report' %}style="color: white" {%
                            endif %}>抑郁症诊断报告</span>
                    </div>
                </div>
                <div class="img-depression"></div>
            </a>
            <div class="rectangle-spliter-line"></div>
        </div>
    </div>
    <div class="vec-rectangle-Rmt-3"></div>
    <a class="frame-setting-container" href="/login">
        <div class="img-fXG-1"></div>
        <div class="text-JEe-2">
            <div class="p-text-JEe-2">
                <span class="span-Ton-1">设置</span>
            </div>
        </div>
    </a>
</div>

<script>
    // 通用侧边栏导航脚本 
    document.addEventListener('DOMContentLoaded', function () {
        const patientLink = document.querySelector(".frame-patient-container");
        patientLink.addEventListener("click", function () {
            window.location.href = "/patient";
        });

        const eegLink = document.querySelector(".frame-naodian-container");
        eegLink.addEventListener("click", function () {
            window.location.href = "/eeg-record";
        });

        const sleepLink = document.querySelector(".frame-shuimian-container");
        sleepLink.addEventListener("click", function () {
            window.location.href = "/sleep-report";
        });

        const depressionLink = document.querySelector(".frame-depression-container");
        depressionLink.addEventListener("click", function () {
            window.location.href = "/depression-report";
        });

        const settingLink = document.querySelector(".frame-setting-container");
        settingLink.addEventListener("click", function () {
            window.location.href = "/login";
        });
    });
</script>